<template>
  <div class="container">
    <Category title="美食">
      <img slot="center" src="./assets/02.jpg" />
      <a slot="footer" href="https://mail.qq.com">更多美食</a>
    </Category>
    <Category title="游戏">
      <ul slot="center">
        <li v-for="(game, index) in games" :key="index">{{ game }}</li>
      </ul>
      <div slot="footer" class="foot">
        <a href="https://mail.qq.com">单机游戏</a>
        <a href="https://mail.qq.com">网络游戏</a>
      </div>
    </Category>
    <Category title="电影"
      ><video
        slot="center"
        controls
        src="https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"
      ></video>
      <!-- <template slot="footer">
        <div class="foot">
          <a href="https://mail.qq.com">经典</a>
          <a href="https://mail.qq.com">单机游戏</a>
          <a href="https://mail.qq.com">单机游戏</a>
        </div>
        <h4>欢迎前来观影</h4>
      </template> -->

      <!-- 当使用template时，第二种写法 -->
      <template v-slot:footer>
        <div class="foot">
          <a href="https://mail.qq.com">经典</a>
          <a href="https://mail.qq.com">单机游戏</a>
          <a href="https://mail.qq.com">单机游戏</a>
        </div>
        <h4>欢迎前来观影</h4>
      </template>
    </Category>
  </div>
</template>

<script>
import Category from "./components/Category.vue";
export default {
  name: "App",
  components: { Category },
  data() {
    return {
      foods: ["火锅", "小龙虾", "牛排"],
      games: ["王者荣耀", "植物大战僵尸", "开心消消乐"],
      files: ["过年", "熊心归来", "伴我熊心"],
    };
  },
};
</script>
<style>
.container,
.foot {
  display: flex;
  justify-content: space-around;
}
img {
  width: 100%;
}
video {
  width: 100%;
}
h4 {
  text-align: center;
}
</style>




